package com.cn.proxy.dynamicproxy;

public class Client {
	public static void main(String[] args) {
		// SubjectA subjectA = (SubjectA) DynamicProxyFactory.createProxy(new
		// RealSubjectA2());
		// subjectA.sing();
		// subjectA.say();
		// System.out.println("+++++++++++++++++++++++++++++++++++++++++++++");
		// SubjectB subjectB = (SubjectB) DynamicProxyFactory.createProxy(new
		// RealSubjectB());
		// subjectB.fly();

		SubjectB subjectB = (SubjectB) MyProxyFactory.getProxy(new RealSubjectB2());
		subjectB.fly();
		subjectB.run();

	}
}
